/*
	klib_volume_manager.h

	contains headers for volume manager functionality

	Author: Aidan Goddard 30/1/13
*/

#ifndef VOLUME_MANAGER_H_INCLUDED
#define VOLUME_MANAGER_H_INCLUDED

#include"ktypes.h"


// storage device registration functions
//uint32_t 	__KLIB__RegisterStorageDevice(HANDLE *handle, (uint32_t *DeviceRead)(uint64_t LBA_start, uint32_t LBA_count, void *buffer), (uint32_t *DeviceWrite)(uint64_t LBA_start, uint32_t LBA_count, void *buffer));







// functions to get a directory listing within a directory or volume root
// path is given by a text representation starting with the volume letter - identical to the windows format: "C:\file\file2" or "C:\file\file2\".
// The string is given in ASCII, null-terminated format
// any trailing "\" is ignored
uint32_t 	__KLIB__GetDirCount(char *path, uint32_t *directory_count);
uint32_t 	__KLIB__GetDirList(char *path, char *directories, uint32_t max_directory_count);	// directories = 128 bytes per directory * number of directories

// functions to get list of volumes
uint32_t	__KLIB__GetVolumeCount(uint32_t *volume_count);
uint32_t	__KLIB__GetVolumes(uint32_t *volumes, uint32_t max_volume_count);	// each volume returned as a number between 1 and 255 (0 is invalid). 1 represents drive A, 2 = B, 26 = Z, 27 = AA, 28 = AB, etc


// error codes
#define VOLUME_MANAGER_SUCCESS		0


#endif
